var privacyBanner=function(n){"use strict";var e=function(){return e=Object.assign||function(n){for(var e,t=1,o=arguments.length;t0&&r[r.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]"undefined"==typeof window,J=()=>"undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__;let V=class{};V.warn=n=>{J()||console.warn(n)},V.error=n=>{J()||console.error(n)},V.info=n=>{J()||console.info(n)},V.debug=n=>{J()||console.debug(n)},V.trace=n=>{J()||console.trace(n)};const G=V;function K(n,e){if(null===n)return"null";if(Array.isArray(n)){return`[${n.map(n=>K(n,!0)).join(",")}]`}if("object"==typeof n){let t=[];for(const e in n)n.hasOwnProperty(e)&&void 0!==n[e]&&""!==n[e]&&t.push(`${e}:${K(n[e],!0)}`);const o=t.join(",");return e?`{${o}}`:o}return"string"==typeof n?JSON.stringify(n):`${n}`}function X(n){try{return decodeURIComponent(n)}catch(n){return""}}const Z="_tracking_consent";function Y(n,e=!1){const t=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let e=0;e{});console.log("Monorail event from consent API:",o,t)}catch(n){}}};function tn(){var n,e;return z()?{}:(null===(n=window.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.config)||{}}en.instance=void 0;function on(n){try{return n()}catch{return}}function rn(){var n,e;if(!un()&&!function(){try{const n=performance.getEntriesByType("navigation")[0].serverTiming;return!!n&&0!=n.length}catch{return!1}}()){const n=new en;let e="failed_to_fetch";try{e=navigator.userAgent}catch{}n.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:e})),function(){if(un())return;const n=ln();n.Shopify||(n.Shopify={});n.Shopify.customerPrivacy||(n.Shopify.customerPrivacy={});n.Shopify.customerPrivacy.serverTimingSupportVerified=!0}()}const t=null===(n=performance)||void 0===n||null===(e=n.getEntriesByType)||void 0===e?void 0:e.call(n,"navigation");if(!t)return;const o=t.map(sn).find(n=>n);if(o)try{sessionStorage.setItem("consentHeader",o)}catch{}return o}let an;function cn(){var n,e;const t=null===(n=performance)||void 0===n||null===(e=n.getEntriesByType)||void 0===e?void 0:e.call(n,"resource");let o=an;for(let n=t.length-1;n>=0;n--){let e=sn(t[n]);if(e){o=e;break}}return an=o,o}function sn(n){var e,t;if(n)return null===(e=n.serverTiming)||void 0===e||null===(t=e.find(n=>"_cmp"==n.name))||void 0===t?void 0:t.description}function ln(){return window}function dn(){var n,e;const t=ln();return!0===(null==t||null===(n=t.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.backendConsentEnabled)||!0===tn().isHeadless}function un(){var n,e;const t=ln();return null==t||null===(n=t.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.serverTimingSupportVerified}function pn(){if(!z()){var n,e;const t=(null===(n=window.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.injectedConsent)||tn().injectedConsent;return t?X(t):void 0}}function fn(n,e){void 0!==n.granular_consent&&function(n){const e=n[D],t=n[E],o=n[I],r=n[_];!0===e?hn(c):!1===e&&hn(u);!0===t?hn(s):!1===t&&hn(p);!0===o?hn(l):!1===o&&hn(f);!0===r?hn(d):!1===r&&hn(h);const g=function(n){const e={marketingAllowed:n[D],saleOfDataAllowed:n[E],analyticsAllowed:n[I],preferencesAllowed:n[_],firstPartyMarketingAllowed:n[D],thirdPartyMarketingAllowed:n[E]};return e}(n);hn(m,g);const y=[o,r,e,t];y.every(n=>!0===n)&&hn(a);y.every(n=>!1===n)&&hn(i)}(e)}function hn(n,e){if(!z())try{document.dispatchEvent(new CustomEvent(n,{detail:e||{}}))}catch(e){console.error(`[Shopify Customer Privacy] Error in event listener for "${n}":`,e)}}function mn(){let n;if(n=z()?pn():function(){var n,e;const t=null===(n=window.Shopify)||void 0===n||null===(e=n.customerPrivacy)||void 0===e?void 0:e.cachedConsent;return t?X(t):void 0}()||pn()||new URLSearchParams(window.location.search).get("_cs")||void 0||Y(Z)||function(){let n;if(n=dn()&&on(cn)||on(rn),!n){let n;try{n=sessionStorage.getItem("consentHeader")}catch{}return n||void 0}try{n=decodeURIComponent(n)}catch{}return n}(),void 0!==n)return function(n){if("%"==n.slice(0,1))try{n=decodeURIComponent(n)}catch{}const e=n.slice(0,1);if("{"==e)return function(n){var e;let t;try{t=JSON.parse(n)}catch{return}if("2.1"!==t.v)return;if(null===(e=t.con)||void 0===e||!e.CMP)return;return t}(n);if("3"==e)return function(n){const e=n.slice(1).split("_"),[t,o,r,a,i]=e;let c,s;try{c=e[5]?JSON.parse(e.slice(5).join("_")):void 0}catch{}if(i){const n=i.replace(/\*/g,"/").replace(/-/g,"+"),e=atob(n);let t="";for(let n=0;nn.slice(0,e)+"-"+n.slice(e),t)}function l(n){const e=t.split(".")[0];return e.includes(n.toLowerCase())?k:e.includes(n.toUpperCase())?x:w}function d(n){return t.includes(n.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[T]:l(T),[B]:l(B),[A]:l(A),[S]:l(S)}},region:o||"",cus:c,purposes:{[I]:d(I),[_]:d(_),[D]:d(D),[E]:d(E)},sale_of_data_region:"t"==a,display_banner:"t"==r,consent_id:s}}(n);return}(n)}function gn(){try{let n=mn();if(!n)return;return n}catch{return}}function yn(){return{m:xn(A),a:xn(T),p:xn(B),s:xn(S)}}function vn(){return yn()[S]}function bn(n=null){return null===n&&(n=gn()),void 0===n}function Cn(n){switch(n){case x:return y;case k:return v;default:return C}}function wn(n){switch(n){case T:return P;case A:return O;case B:return M;case S:return R}}function xn(n){const e=gn();if(!e)return w;const t=e.con.CMP;return t?t[n]:w}function kn(n){const e=gn();if(!e||!e.purposes)return!0;const t=e.purposes[n];return"boolean"!=typeof t||t}function _n(){return kn(_)}function In(){return kn(I)}function Dn(){return kn(D)}function En(){return kn(E)}function An(){const n=gn();return!!n&&("boolean"==typeof n.display_banner&&n.display_banner)}function Tn(){const n=gn();return n&&n.sale_of_data_region||!1}const Bn="v0.2";function Sn(n,e){if(!n)return;const t=function(n){const e=new URL(n,window.location.origin),t=Pn(n)?On(e):On(e).replace(window.location.origin,""),o=document.querySelectorAll(`a[href^="${t}"]`),r=document.querySelectorAll(`a[href*="${window.location.hostname}/customer_authentication"]`),a=new Set,i=[];for(let n=0;n{if(n.ok)return n.json();{const e=new Error("Server error");throw e.cause={status:n.status},e}})}function Hn(n,e,t){const o=tn().consentDomain||e.granular_consent.checkoutRootDomain||window.location.host;let r=[];return r.push(Rn(o,e).then(n=>{var o,r;const a=n.data.consentManagement.cookies.cookieDomain,i=n.data.consentManagement.cookies.trackingConsentCookie,c=null!==(o=null===(r=n.data.consentManagement)||void 0===r?void 0:r.customerAccountUrl)&&void 0!==o?o:"";var s,l;if(i&&(s=i,null!==(l=window.Shopify)&&void 0!==l&&l.customerPrivacy||(window.Shopify=window.Shopify||{},window.Shopify.customerPrivacy={}),window.Shopify.customerPrivacy.cachedConsent=s),function(n){return n.granular_consent.headlessStorefront}(e)&&!dn()){const n=31536e6,t=e.granular_consent,o=a||t.checkoutRootDomain||window.location.hostname,r=t.storefrontRootDomain||a||window.location.hostname;nn(Z,o,n,i),r!==o&&nn(Z,r,n,i)}return fn(e,{[_]:_n(),[I]:In(),[D]:Dn(),[E]:En()}),Sn(c,i),void 0!==t&&t(null,n),n})),Promise.race(r).catch(n=>{var e;const o="Error while setting storefront API consent: "+n.message,r=null===(e=n.cause)||void 0===e?void 0:e.status,a={error:o};if(void 0!==r&&(a.statusCode=r),void 0===t)throw a;t(a)})}const Ln=[O,P,M,R],jn=[...Ln,H,j,N,$,W,L,q,F,U],Nn=Ln.map(n=>`"${n}"`).join(", "),$n="https://shopify.dev/docs/api/customer-privacy";function Wn(n,e){if(z())throw new Error("setTrackingConsent is not supported in Node.js environments. This function requires browser APIs (XHR, cookies, window) and can only be called client-side.");const t=new en;if(In()&&t.produce("setTrackingConsent",Bn),function(n){if("boolean"!=typeof n&&"object"!=typeof n)throw new r(`setTrackingConsent received an invalid argument of type "${typeof n}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${$n} for documentation.`);if("object"==typeof n){const e=Object.keys(n);if(0===e.length)throw new r(`The submitted consent object is empty. Expected at least one consent key: ${Nn}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${$n} for documentation.`);for(const n of e)if(!jn.includes(n))throw new r(`The submitted consent object contains an invalid key: "${n}". Valid keys are: ${Nn}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${$n} for documentation.`)}}(n),void 0!==e&&"function"!=typeof e)throw new r(`setTrackingConsent received an invalid callback of type "${typeof e}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${$n} for documentation.`);const o=function(n){if(!n)return null;try{return Un()?document.referrer:""}catch{return""}}(n.analytics),a=function(n){if(!n)return null;if(!Un())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}(n.analytics);return Hn(0,{granular_consent:n,...null!==o&&{referrer:o},...null!==a&&{landing_page:a}},e)}function qn(){const n=new en;if(In()&&n.produce("getTrackingConsent",Bn),bn())return C;const e=yn();return e[A]===x&&e[T]===x?y:e[A]===k||e[T]===k?v:b}function Fn(){return function(){const n=gn();return bn(n)?"":n.region||""}()}function Un(){try{if(""===document.referrer)return!0;const n=document.createElement("a");return n.href=document.referrer,window.location.hostname!=n.hostname}catch{return!0}}function zn(){return!!bn()||Dn()&&In()}function Jn(){return Tn()?"string"==typeof navigator.globalPrivacyControl?"1"!==navigator.globalPrivacyControl:"boolean"==typeof navigator.globalPrivacyControl?!navigator.globalPrivacyControl:null:null}function Vn(){return An()&&qn()===b}function Gn(){return!1===Jn()?v:(n=vn(),bn()?C:n===w?b:Cn(n));var n}function Kn(){return!0}function Xn(n){return function(n){const e=gn();if(bn(e)||!e.cus)return;const t=e.cus[encodeURIComponent(n)];return t?decodeURIComponent(t):t}(n)}function Zn(){const n={},e=yn();for(const t of Object.keys(e))n[wn(t)]=Cn(e[t]);return n}function Yn(){return function(){const n=gn();return n&&n.consent_id||""}()}const Qn="95ba910bcec4542ef2a0b64cd7ca666c";function ne(n,e,t){try{var o;!function(n){const e=new XMLHttpRequest;e.open("POST","https://error-analytics-production.shopifysvc.com",!0),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("Bugsnag-Api-Key",Qn),e.setRequestHeader("Bugsnag-Payload-Version","5");const t=function(n){var e;const t=function(n){return n?n.stackTrace||n.stack||n.description||n.name:void 0}(n.error);let o,r;if(null!==(e=n.error)&&void 0!==e&&e.name){var a,i;o=n.error.name,r=null!==(a=null===(i=n.error)||void 0===i?void 0:i.message)&&void 0!==a?a:""}else{const e=(t||"unknown error").split("\n")[0],a=e.indexOf(":");var c,s,l;if(a>0)o=e.substring(0,a).trim(),r=e.substring(a+1).trim();else o=e.trim()||"unknown error",r=(null===(c=n.error)||void 0===c?void 0:c.message)||(null===(s=n.error)||void 0===s?void 0:s.error)||(null===(l=n.error)||void 0===l?void 0:l.toString())||"No error message available"}return JSON.stringify({payloadVersion:5,notifier:{name:"ConsentTrackingAPI",version:"latest",url:"-"},events:[{exceptions:[{errorClass:o,message:r,stacktrace:[{file:"consent-tracking-api.js",lineNumber:"1",method:t}],type:"browserjs"}],context:"general",app:{id:"ConsentTrackingAPI",version:"latest"},metaData:{request:{shopId:n.shopId,shopUrl:window.location.href},device:{userAgent:window.navigator.userAgent},"Additional Notes":n.notes},unhandled:!1}]})}(n);e.send(t)}({error:n,context:null!=e?e:"",shopId:te()||(null===(o=window.Shopify)||void 0===o?void 0:o.shop),notes:null!=t?t:""})}catch(n){}}function ee(n){return(...e)=>{try{return n(...e)}catch(n){throw n instanceof r||ne(n),n}}}function te(){try{var n;const e=null===(n=document.getElementById("shopify-features"))||void 0===n?void 0:n.textContent;return e?JSON.parse(e).shopId:null}catch(n){return null}}function oe(){return Dn()}function re(){return In()}function ae(){return _n()}function ie(){return En()}function ce(n={useBugsnagReporting:!1}){return(({useBugsnagReporting:n})=>{vn()!=k&&!1===Jn()&&Wn({sale_of_data:!1},()=>!1);const e={analyticsProcessingAllowed:In,currentVisitorConsent:Zn,doesMerchantSupportGranularConsent:Kn,firstPartyMarketingAllowed:oe,getCCPAConsent:Gn,getRegion:Fn,getTrackingConsent:qn,getTrackingConsentMetafield:Xn,marketingAllowed:oe,preferencesProcessingAllowed:_n,saleOfDataAllowed:ie,saleOfDataRegion:Tn,setTrackingConsent:Wn,shouldShowBanner:An,shouldShowGDPRBanner:Vn,thirdPartyMarketingAllowed:ie,userCanBeTracked:zn,consentId:Yn,unstable:{},__metadata__:{name:"@shopify/consent-tracking-api",version:Bn,description:"Shopify Consent Tracking API"},config:tn()};if(!n)return e;const t=e;for(const n in t)if(t.hasOwnProperty(n)){const e=t[n];"function"==typeof e&&(t[n]=ee(e))}return e})(n)}var se,le,de,ue,pe,fe;!function(n){n.BottomCenter="bottom_center",n.BottomFullWidth="bottom_full_width",n.BottomLeft="bottom_left",n.BottomRight="bottom_right",n.Center="center"}(se||(se={})),function(n){n.Custom="custom",n.Dark="dark",n.Light="light"}(le||(le={})),function(n){n[n.Yes=1]="Yes",n[n.No=0]="No"}(de||(de={})),function(n){n.StylesContainerId="shopify-pc__banner__styles",n.DialogId="shopify-pc__banner",n.DialogClass="shopify-pc__banner__dialog",n.WrapperClass="shopify-pc__banner__wrapper",n.BodyClass="shopify-pc__banner__body",n.BodyTitleId="shopify-pc__banner__body-title",n.BodyCopyPolicyLinkId="shopify-pc__banner__body-policy-link",n.ButtonsClass="shopify-pc__banner__btns",n.ButtonsGranularClass="shopify-pc__banner__btns-granular",n.ButtonAcceptId="shopify-pc__banner__btn-accept",n.ButtonAcceptClass="shopify-pc__banner__btn-accept",n.ButtonDeclineId="shopify-pc__banner__btn-decline",n.ButtonDeclineClass="shopify-pc__banner__btn-decline",n.ButtonManagePrefsId="shopify-pc__banner__btn-manage-prefs",n.ButtonManagePrefsClass="shopify-pc__banner__btn-manage-prefs"}(ue||(ue={})),function(n){n.StylesContainerId="shopify-pc__prefs__styles",n.OverlayId="shopify-pc__prefs__overlay",n.OverlayClass="shopify-pc__prefs__overlay",n.WrapperId="shopify-pc__prefs",n.WrapperClass="shopify-pc__prefs",n.DialogId="shopify-pc__prefs__dialog",n.DialogClass="shopify-pc__prefs__dialog",n.DialogScrollableClass="shopify-pc__prefs__scrollable",n.HeaderTitleId="shopify-pc__prefs__header-title",n.HeaderActionsClass="shopify-pc__prefs__header-actions",n.HeaderSaveId="shopify-pc__prefs__header-save",n.HeaderAcceptId="shopify-pc__prefs__header-accept",n.HeaderDeclineId="shopify-pc__prefs__header-decline",n.HeaderCloseId="shopify-pc__prefs__header-close",n.HeaderCloseClass="shopify-pc__prefs__header-close",n.IntroClass="shopify-pc__prefs__intro",n.IntroMainClass="shopify-pc__prefs__intro-main",n.IntroExplainWrapperClass="shopify-pc__prefs__intro-explain",n.IntroExplainAcceptClass="shopify-pc__prefs__intro-explain-accept",n.IntroExplainDeclineClass="shopify-pc__prefs__intro-explain-decline",n.OptionWrapperClass="shopify-pc__prefs__options",n.OptionClass="shopify-pc__prefs__option",n.OptionEssentialId="shopify-pc__prefs__essential",n.OptionEssentialInputId="shopify-pc__prefs__essential-input",n.OptionMarketingId="shopify-pc__prefs__marketing",n.OptionMarketingInputId="shopify-pc__prefs__marketing-input",n.OptionAnalyticsId="shopify-pc__prefs__analytics",n.OptionAnalyticsInputId="shopify-pc__prefs__analytics-input",n.OptionPreferencesId="shopify-pc__prefs__preferences",n.OptionPreferencesInputId="shopify-pc__prefs__preferences-input"}(pe||(pe={})),function(n){n.Black="#333",n.White="#fff",n.Gray="#ccc",n.Green="#3AA83A",n.LightGray="#F7F8F9",n.DarkGray="#36454F",n.VeryDarkGray="#666",n.VeryLightGray="#e5e5e5"}(fe||(fe={}));var he=function(n){return"\n border: 1px solid ".concat(n.button.borderColor,";\n color: ").concat(n.button.fontColor,";\n background: ").concat(n.button.backgroundColor,";\n ")};function me(n,e,t,o){void 0===e&&(e="0,0,100,100"),void 0===t&&(t="0,0,0,100"),void 0===o&&(o="0,0,100,100");var r=n.split(","),a=r[0],i=r[1],c=r[2],s=r[3],l=e.split(","),d=l[0],u=l[1],p=l[2],f=l[3],h=t.split(","),m=h[0],g=h[1],y=h[2],v=h[3],b=o.split(","),C=b[0],w=b[1],x=b[2],k=b[3],_={hue:Number(a),saturation:Number(i),lightness:Number(c),alpha:Number(s)},I={hue:Number(d),saturation:Number(u),lightness:Number(p),alpha:Number(f)},D={hue:Number(m),saturation:Number(g),lightness:Number(y),alpha:Number(v)},E={hue:Number(C),saturation:Number(w),lightness:Number(x),alpha:Number(k)},A={hue:_.hue,saturation:_.saturation,lightness:_.lightness,alpha:_.alpha-10},T={hue:I.hue,saturation:I.saturation,lightness:I.lightness<50?I.lightness+14:I.lightness-12,alpha:I.alpha},B={hue:201,saturation:I.lightness<50?60:90,lightness:I.lightness<50?60:80,alpha:I.lightness<50?80:100};return{font:ge(_),fontSubdued:ge(A),buttonFont:ge(D),buttonBackground:ge(E),background:ge(I),divider:ge(T),focused:ge(B)}}function ge(n){return"hsl(".concat(n.hue,"deg, ").concat(n.saturation,"%, ").concat(n.lightness,"%, ").concat(n.alpha,"%)")}function ye(n,e,t,o,r){var a="0,0,0,100",i="0,0,100,100",c=me("0,0,12,100","0,0,100,100","0,0,12,100","0,0,100,100"),s=me("0,0,100,87","0,0,12,100","0,0,100,87","0,0,12,100"),l=me(null!=e?e:a,null!=t?t:i,null!=o?o:a,null!=r?r:i),d=function(){switch(n){case le.Light:return c;case le.Dark:return s;case le.Custom:return l;default:return c}}();return{backgroundColor:d.background,fontColor:d.font,fontSubduedColor:d.fontSubdued,sectionDivider:d.divider,iconColor:d.font,focused:d.focused,button:{borderColor:d.buttonFont,backgroundColor:d.buttonBackground,fontColor:d.buttonFont},primaryButton:{borderColor:d.buttonBackground,backgroundColor:d.buttonFont,fontColor:d.buttonBackground}}}function ve(n){var e=n.bannerData,t=n.selectorPrefix,o=t?"".concat(t," "):"",r=ye(e.theme.theme,e.theme.fontColor,e.theme.backgroundColor,e.theme.buttonFontColor,e.theme.buttonBackgroundColor),a=function(n,e,t){var o="1280px",r="\n ".concat(t,".").concat(ue.WrapperClass," {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-direction: column;\n }\n "),a="\n position: fixed;\n z-index: 2000000;\n box-shadow: 0px 4px 10px rgb(63 63 68 / 40%);\n max-height: 90%;\n box-sizing: border-box;\n opacity: 1;\n padding: 32px;\n background-color: ".concat(e.backgroundColor,";\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n border: none;\n text-align: left;\n "),i=function(){var n="\n ".concat(t,".").concat(ue.ButtonsClass," {\n flex-direction: column;\n }\n ").concat(t,".").concat(ue.ButtonsGranularClass," :nth-child(1) {\n order: 3;\n }\n ").concat(t,".").concat(ue.ButtonsGranularClass," :nth-child(2) {\n order: 1;\n }\n ").concat(t,".").concat(ue.ButtonsGranularClass," :nth-child(3) {\n order: 2;\n }\n ");return"\n @media only screen and (max-width: 480px) {\n ".concat(n,"\n }\n ")},c="\n ".concat(t,".").concat(ue.DialogClass," {\n ").concat(a,"\n bottom: 0%;\n width: 100%;\n }\n ").concat(t,".").concat(ue.DialogClass," button {\n margin: 0 10px 0 0;\n }\n @media only screen and (max-width: ").concat(o,") {\n ").concat(t,".").concat(ue.DialogClass," button {\n margin: 15px 10px 0 0;\n }\n }\n ").concat(r,"\n ").concat(t,".").concat(ue.WrapperClass," {\n flex-direction: row;\n }\n @media only screen and (max-width: ").concat(o,") {\n ").concat(t,".").concat(ue.WrapperClass," {\n flex-direction: column;\n }\n }\n ").concat(t,".").concat(ue.BodyClass," {\n margin-right: 5%;\n margin-bottom: 0;\n }\n @media only screen and (max-width: ").concat(o,") {\n ").concat(t,".").concat(ue.BodyClass," {\n margin-right: 0;\n margin-bottom: 10px;\n width: 100%;\n }\n }\n ").concat(t,".").concat(ue.ButtonsClass," {\n display: flex;\n min-width: 580px;\n flex-direction: row;\n }\n @media only screen and (max-width: ").concat(o,") {\n ").concat(t,".").concat(ue.ButtonsClass," {\n min-width: auto;\n width: 100%;\n justify-content: flex-end;\n }\n }\n ").concat(i(),"\n "),s="\n ".concat(t,".").concat(ue.DialogClass," {\n ").concat(a,"\n top: 50%;\n left: 25%;\n width: 50%;\n transform: translate(0, -50%);\n min-width: 280px;\n border-radius: 3px;\n }\n ").concat(r,"\n @media only screen and (max-width: 1300px) {\n ").concat(t,".").concat(ue.DialogClass," {\n left: 15%;\n width: 70%;\n }\n }\n @media only screen and (max-width: 900px) {\n ").concat(t,".").concat(ue.DialogClass," {\n left: 5%;\n width: 90%;\n }\n }\n ").concat(t,".").concat(ue.BodyClass," {\n width: 100%;\n margin-bottom: 10px;\n }\n ").concat(t,".").concat(ue.ButtonsClass," {\n display: flex;\n width: 100%;\n justify-content: flex-end;\n flex-direction: row;\n }\n ").concat(i(),"\n "),l="\n ".concat(t,".").concat(ue.DialogClass," {\n ").concat(a,"\n bottom: 0;\n left: 0;\n max-width: 650px;\n border-top-right-radius: 3px;\n }\n ").concat(r,"\n ").concat(t,".").concat(ue.BodyClass," {\n width: 100%;\n margin-bottom: 10px;\n }\n ").concat(t,".").concat(ue.ButtonsClass," {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n flex-direction: row;\n }\n ").concat(i(),"\n "),d="\n ".concat(t,".").concat(ue.DialogClass," {\n ").concat(a,"\n bottom: 0;\n right: 0;\n max-width: 650px;\n border-top-left-radius: 3px;\n }\n ").concat(r,"\n ").concat(t,".").concat(ue.BodyClass," {\n width: 100%;\n margin-bottom: 10px;\n }\n ").concat(t,".").concat(ue.ButtonsClass," {\n display: flex;\n justify-content: flex-end;\n width: 100%;\n flex-direction: row;\n }\n ").concat(i(),"\n "),u="\n ".concat(t,".").concat(ue.DialogClass," {\n ").concat(a,"\n bottom: 0;\n left: 25%;\n width: 50%;\n min-width: 280px;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n }\n ").concat(r,"\n @media only screen and (max-width: 1300px) {\n ").concat(t,".").concat(ue.DialogClass," {\n left: 15%;\n width: 70%;\n }\n }\n @media only screen and (max-width: 900px) {\n ").concat(t,".").concat(ue.DialogClass," {\n left: 5%;\n width: 90%;\n }\n }\n ").concat(t,".").concat(ue.BodyClass," {\n width: 100%;\n margin-bottom: 10px;\n }\n ").concat(t,".").concat(ue.ButtonsClass," {\n display: flex;\n width: 100%;\n justify-content: flex-end;\n flex-direction: row;\n }\n ").concat(i(),"\n ");switch(n){case se.BottomFullWidth:return c;case se.Center:return s;case se.BottomLeft:return l;case se.BottomRight:return d;case se.BottomCenter:return u;default:return c}}(e.position,r,o),i=function(n,e){if(n===le.Custom)return{accept:he(e),decline:he(e),manage:(t=e,"\n border: none;\n color: ".concat(t.fontColor,";\n background: transparent;\n "))};var t,o=n===le.Dark,r="\n background: ".concat(o?fe.Black:fe.White,";\n color: ").concat(o?fe.White:fe.Black,";\n ");return{accept:r,decline:r,manage:"\n background: transparent;\n border: none;\n color: ".concat(o?fe.White:fe.Black,";\n ")}}(e.theme.theme,r);return"\n ".concat(o,".").concat(ue.DialogClass," h2 {\n color: ").concat(r.fontColor,";\n font-family: inherit;\n font-size: 120%;\n margin: 0 0 .5em 0;\n padding: 0;\n font-weight: bold;\n }\n ").concat(o,".").concat(ue.DialogClass," p {\n color: ").concat(r.fontColor,";\n font-family: inherit;\n line-height: 1.3;\n margin: 0;\n padding: 0;\n }\n ").concat(o,".").concat(ue.DialogClass," a {\n color: ").concat(r.fontColor,";\n text-decoration: underline;\n }\n ").concat(o,".").concat(ue.DialogClass," button {\n border: none;\n text-decoration: none;\n font-family: inherit;\n padding: 8px 25px;\n margin: 15px 20px 0 0;\n font-size: 100%;\n flex-basis: 50%;\n border-radius: 2px;\n line-height: 120%;\n height: unset;\n text-align: center;\n }\n ").concat(o,".").concat(ue.DialogClass," button:focus {\n outline: none;\n box-shadow: 0 0 0 4px ").concat(r.focused,";\n }\n ").concat(o,".").concat(ue.DialogClass," button:hover {\n cursor: pointer;\n }\n ").concat(o,".").concat(ue.DialogClass," button.").concat(ue.ButtonAcceptClass," {\n border: 1px solid ").concat(r.button.borderColor,";\n ").concat(i.accept,"\n }\n ").concat(o,".").concat(ue.DialogClass," button.").concat(ue.ButtonManagePrefsClass," {\n text-decoration: underline;\n ").concat(i.manage,"\n }\n ").concat(o,".").concat(ue.DialogClass," button.").concat(ue.ButtonManagePrefsClass,":focus {\n box-shadow: none;\n }\n ").concat(o,".").concat(ue.DialogClass," button.").concat(ue.ButtonManagePrefsClass,":focus span {\n outline: 2px solid ").concat(r.focused,";\n }\n ").concat(o,".").concat(ue.DialogClass," button.").concat(ue.ButtonDeclineClass," {\n border: 1px solid ").concat(r.button.borderColor,";\n ").concat(i.decline,"\n }\n ").concat(o,".").concat(ue.BodyClass," p a:focus {\n outline: 2px solid ").concat(r.focused,";\n box-shadow: none;\n }\n ").concat(a,"\n ")}var be="8e9cb600c40a8849ba2b6151bb05805c";function Ce(n,e,t){var o;try{!function(n){var e=new XMLHttpRequest;e.open("POST","https://error-analytics-production.shopifysvc.com",!0),e.setRequestHeader("Content-Type","application/json"),e.setRequestHeader("Bugsnag-Api-Key",be),e.setRequestHeader("Bugsnag-Payload-Version","5");var t=function(n){var e=function(n){return n.stackTrace||n.stack||n.description||n.name}(n.error),t=n.error&&"string"==typeof n.error.name&&n.error.name.trim()||"",o=n.error&&"string"==typeof n.error.message&&n.error.message.trim()||"",r=(e||"unknown error").split("\n")[0],a=t||"Error",i=o||r;return JSON.stringify({payloadVersion:5,notifier:{name:"privacyBanner",version:"latest",url:"-"},events:[{exceptions:[{errorClass:a.trim(),message:(i||"").trim(),stacktrace:[{file:"storefront-banner.js",lineNumber:"1",method:e}],type:"browserjs"}],context:n.context||"general",app:{id:"privacyBanner",version:"latest"},metaData:{request:{shopId:n.shopId,shopUrl:window.location.href},device:{userAgent:window.navigator.userAgent},"Additional Notes":n.notes},unhandled:!1}]})}(n);e.send(t)}({error:n,context:e,shopId:we()||(null===(o=window.Shopify)||void 0===o?void 0:o.shop),notes:t})}catch(n){}}function we(){var n;try{var e=null===(n=null===document||void 0===document?void 0:document.getElementById("shopify-features"))||void 0===n?void 0:n.textContent;return e?JSON.parse(e).shopId:null}catch(n){return null}}function xe(n){var e=window.location.search.substring(1);if(0===e.length)return null;var t=e.split("&").map(function(n){return n.split("=")}),o=t.filter(function(e){return e[0]===n})[0];return(o?o[1]:null)||null}function ke(n){var e={marketing:n.marketing,analytics:n.analytics,preferences:n.preferences,sale_of_data:n.sale_of_data};!(Object.keys(tn()).length>0)&&n.storefrontAccessToken&&(e.headlessStorefront=!0,e.checkoutRootDomain=n.checkoutRootDomain,e.storefrontRootDomain=n.storefrontRootDomain,e.storefrontAccessToken=n.storefrontAccessToken),Wn(e,n.callback)}var _e=function(){var n=Zn();return n.marketing===C&&n.analytics===C&&n.preferences===C},Ie=["127.0.0.1"],De=function(){var n,e=An()&&_e();return!window.location.pathname.match(/\/password$/)&&(n=window.location.hostname||window.location.host||"",!Ie.some(function(e){return n.startsWith(e)}))&&e},Ee=function(){return"1"===xe("preview_privacy_banner")},Ae=function(){var n;return Boolean(!0===(null===(n=null===window||void 0===window?void 0:window.Shopify)||void 0===n?void 0:n.previewMode))&&_e()},Te=function(){return Ee()||Ae()},Be=function(){function n(){}return n.getServerData=function(n,e,r,a,i){return t(this,void 0,void 0,function(){return o(this,function(t){return this.domain=n,this.accessToken=null!=e?e:i?void 0:this.liquidAccessToken(),this.locale=r,this.country=a,this.isOptionalToken=i,[2,this.getDataFromStorefrontApi()]})})},n.getEmbeddedData=function(){var n=document.getElementById("scb4127");if(n)return JSON.parse(n.textContent||"")},n.fetchParams=function(n){var e=n.accessToken,t=n.unlocalized,o=this.currentLanguage(),r=this.currentCountry(),a=!o||!r||t?"":"@inContext(language: ".concat(o,", country: ").concat(r,")"),i=Te(),c={"content-type":"application/json"};return e&&(c["x-shopify-storefront-access-token"]=e),{headers:c,body:JSON.stringify({query:"\n query bannerQuery ($isPreviewMode: Boolean = ".concat(i,") ").concat(a," {\n consentManagement {\n banner {\n enabled\n position\n policyLinkText\n policyLinkUrl\n title\n text\n buttonPrefsOpenText\n buttonAcceptText\n buttonDeclineText\n regionVisibility @include(if: $isPreviewMode)\n theme {\n theme\n fontColor\n backgroundColor\n buttonFontColor\n buttonBackgroundColor\n }\n preferences {\n title\n introTitle\n introText\n buttonAcceptText\n buttonDeclineText\n buttonSaveText\n bulletPoints {\n enabled\n title\n firstText\n secondText\n thirdText\n }\n purposes {\n essentialName\n essentialDesc\n performanceName\n performanceDesc\n preferencesName\n preferencesDesc\n marketingName\n marketingDesc\n }\n }\n }\n }\n }"),variables:{isPreviewMode:Te()}}),method:"POST"}},n.getDataFromStorefrontApi=function(n){return t(this,void 0,void 0,function(){var t,r,a,i,c,s,l,d;return o(this,function(o){switch(o.label){case 0:if(!this.accessToken&&!this.isOptionalToken)throw new Error("Missing access token");return t=/^(localhost|127\.0\.0\.1)(:|$)/.test(this.domain||"")?"http":"https",r=this.domain?"".concat(t,"://").concat(this.domain):"",a="".concat(r,"/api/unstable/graphql.json"),[4,fetch(a,this.fetchParams({accessToken:this.accessToken,unlocalized:n}))];case 1:return 200!==(i=o.sent()).status?[3,3]:[4,i.json()];case 2:if((c=o.sent()).errors){if((s=c.errors.find(function(n){return"argumentLiteralsIncompatible"===n.extensions.code||"variableLiteralsIncompatible"===n.extensions.code}))&&!n)return l=s.message||"",d=l.includes("Directive 'inContext'")&&l.includes("invalid value"),window.Weglot||d?console.log("Banner localization error",s.message):Ce(new Error(s.message),"DataFetching"),[2,this.getDataFromStorefrontApi(!0)];throw new Error(c.errors[0].message)}return[2,e({},c.data.consentManagement.banner)];case 3:throw new Error("Could not reach the server")}})})},n.liquidAccessToken=function(){var n=document.documentElement.querySelector("#shopify-features");if(n){var e=JSON.parse(n.textContent||"").accessToken;if(e)return e;console.warn("Could not find liquid access token")}else console.warn("Could not find liquid access token")},n.currentLanguage=function(){var n=this.locale;if(n){n=n.replace("-","_").toUpperCase();return["PT_BR","PT_PT","ZH_CN","ZH_TW"].includes(n)||(n=n.split("_")[0]),n}},n.currentCountry=function(){var n;return null===(n=this.country)||void 0===n?void 0:n.toUpperCase()},n}();function Se(n,e,t){return(e=function(n){var e=function(n,e){if("object"!=typeof n||!n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var o=t.call(n,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==typeof e?e:e+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Oe(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),t.push.apply(t,o)}return t}function Pe(n){for(var e=1;en.toString(16)).join("")}function Ne(n,e=!0){return n&&Object.keys(n).length&&e?Object.keys(n).map(e=>({[$e(e)]:n[e]})).reduce((n,e)=>Pe(Pe({},n),e)):n}function $e(n){return n.split(/(?=[A-Z])/).join("_").toLowerCase()}function We(n){return n.events.map(n=>{let e=!0,t=!0;return n&&n.options&&Object.prototype.hasOwnProperty.call(n.options,"convertEventCase")&&(e=Boolean(n.options.convertEventCase)),n&&n.options&&Object.prototype.hasOwnProperty.call(n.options,"convertMetaDataCase")&&(t=Boolean(n.options.convertMetaDataCase)),{schema_id:n.schemaId,payload:Ne(n.payload,e),metadata:Ne(n.metadata,t)}})}class qe extends Error{constructor(n){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(n)}`),this.response=n,Object.setPrototypeOf(this,qe.prototype)}}class Fe extends Error{constructor(n){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(n)}`),Object.setPrototypeOf(this,Fe.prototype),this.response=n}}class Ue extends Error{constructor(n){super(`Error completing request. A network failure may have prevented the request from completing. Error: ${n}`),Object.setPrototypeOf(this,Ue.prototype)}}class ze{static withEndpoint(n){return new ze(`https://${new URL(n).hostname}`)}constructor(n=Me,e=!1){this.edgeDomain=n,this.keepalive=e}async produceBatch(n){const e={events:We(n),metadata:Ne(n.metadata)};let t;try{t=await fetch(this.produceBatchEndpoint(),{method:"post",headers:Je(n.metadata),body:JSON.stringify(e),keepalive:this.keepalive})}catch(n){throw new Ue(n)}if(207===t.status){const n=await t.json();throw new Fe(n)}if(!t.ok)throw new qe({status:t.status,message:await t.text()});return{status:t.status}}async produce(n){let e,t=!0;n&&n.options&&Object.prototype.hasOwnProperty.call(n.options,"convertEventCase")&&(t=Boolean(n.options.convertEventCase));try{e=await async function({endpoint:n,event:e,keepalive:t}){return fetch(null!=n?n:Re+He,{method:"post",headers:Je(e.metadata),body:JSON.stringify({schema_id:e.schemaId,payload:e.payload}),keepalive:t})}({endpoint:this.produceEndpoint(),keepalive:this.keepalive,event:Pe(Pe({},n),{},{payload:Ne(n.payload,t)})})}catch(n){throw new Ue(n)}if(!e)throw new qe({message:"No response from edge"});if(!e.ok)throw new qe({status:e.status,message:await e.text()});return{status:e.status}}produceBatchEndpoint(){return this.edgeDomain+"/unstable/produce_batch"}produceEndpoint(){return this.edgeDomain+He}}function Je(n){const e={"Content-Type":"application/json; charset=utf-8","X-Monorail-Edge-Event-Created-At-Ms":(n&&n.eventCreatedAtMs||Date.now()).toString(),"X-Monorail-Edge-Event-Sent-At-Ms":Date.now().toString(),"X-Monorail-Edge-Client-Message-Id":(n&&n.clientMessageId||je()).toString()};return n&&n.userAgent&&(e["User-Agent"]=n.userAgent),n&&n.remoteIp&&(e["X-Forwarded-For"]=n.remoteIp),e}class Ve{static printWelcomeMessage(n){console.log(`%c👋 from Monorail%c\n\nWe've noticed that you're${n?"":" not"} running in debug mode. As such, we will ${n?"produce":"not produce"} Monorail events to the console. \n\nIf you want Monorail events to ${n?"stop":"start"} appearing here, %cset debugMode=${(!n).toString()}%c, for the Monorail Log Producer in your code.`,"font-size: large;","font-size: normal;","font-weight: bold;","font-weight: normal;")}constructor(n){this.sendToConsole=n,n&&Ve.printWelcomeMessage(n)}produce(n){return this.sendToConsole&&console.log("Monorail event produced",n),new Promise(e=>{e(n)})}produceBatch(n){return this.sendToConsole&&console.log("Monorail Batch event produced",n),new Promise(e=>{e(n)})}}class Ge{static createLogProducer(n){return new Ge(new Ve(n.debugMode),n.middleware||[])}static createHttpProducerWithEndpoint(n,e=[]){return new Ge(ze.withEndpoint(n),e)}static createHttpProducer(n){const e=n.options&&n.options.keepalive;return new Ge(n.production?new ze(Re,e):new ze(Me,e),n.middleware||[])}static buildMiddlewareChain(n,e=0){return e===n.length?this.identityFn:t=>n[e].do(t,this.buildMiddlewareChain(n,e+1))}constructor(n,e){this.producer=n,this.middleware=e,this.executeChain=Ge.buildMiddlewareChain(this.middleware.concat(new Le(n)))}produce(n){return n.metadata=Pe({eventCreatedAtMs:Date.now(),clientMessageId:je()},n.metadata),this.executeChain(n)}produceBatch(n){return this.executeChain(n)}}var Ke,Xe,Ze,Ye,Qe=function(){function n(n){var e=void 0===n?{}:n,t=e.shopDomain,o=e.isHeadless;this.VISIT_TOKEN="_shopify_s",this.shopDomain=t,this.isHeadless=o,this.monorail=Ge.createHttpProducer({production:!0})}return n.prototype.shouldEmit=function(){return!(this.isHeadless&&!0)},n.prototype.emitInteraction=function(n,t){if(void 0===t&&(t=""),this.shouldEmit()){var o=this.getCommonPayload();try{this.monorail.produce({schemaId:"privacy_banner_interact/1.2",payload:e(e(e({},o),t&&{interactionMetadata:t}),{interactionType:n})})}catch(n){console.log("Error emitting interaction:",n)}}},n.prototype.emitRender=function(){if(this.shouldEmit()){var n=this.getCommonPayload();try{this.monorail.produce({schemaId:"privacy_banner_render/1.1",payload:e({},n)})}catch(n){console.log("Error emitting interaction:",n)}}},n.prototype.emitInitialized=function(){if(this.shouldEmit()){var n=this.getCommonPayload();try{this.monorail.produce({schemaId:"privacy_banner_initialized/1.0",payload:e({},n)})}catch(n){console.log("Error emitting interaction:",n)}}},n.prototype.visitorRegion=function(){var n=document.cookie.split(";").find(function(n){return n.includes("_tracking_consent=")});if(!n)return null;var e={};try{e=JSON.parse(unescape(n.split("=")[1]))}catch(n){return null}return e.region||null},n.prototype.getCommonPayload=function(){var n,t=this.shopDomain||(null===(n=window.Shopify)||void 0===n?void 0:n.shop),o=function(n){for(var e=0,t=decodeURIComponent(document.cookie).split(";");e